package Merger;

import java.util.Random;

/**
 * Created with IntelliJ IDEA.
 * User: lysergid
 * Date: 27.10.13
 * Time: 9:24
 * To change this template use File | Settings | File Templates.
 */
public class MergeDataGenerator implements DataGenerator{

    private static final int SIZE = (int) Math.sqrt((double) Integer.MAX_VALUE);
    private Random rand = new Random();

    @Override
    public int[] createBadArray() {
        int[] badArray = new int[SIZE];
        for (int i = 0; i < SIZE; i++) {
            badArray[i] = rand.nextInt();
        }
        return badArray;

    }

    @Override
    public int[] createNormalArray() {
        int[] normalArray = new int[SIZE / 2];
        for (int i = 0; i < SIZE / 2; i++) {
            normalArray[i] = rand.nextInt();
        }
        return normalArray;
    }

    @Override
    public int[] createGoodArray() {
        return new int[]{rand.nextInt(), rand.nextInt()};
    }
}
